﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using condortravel.operaciones.core.DataModel;
using System.Data.Linq;

namespace condortravel.operaciones.persistence.operacionesImpl
{
    public class GuiaTuristicoDAOImpl : condortravel.operaciones.persistence.Impl.GenericDAO<Tb_GuiaTuristico, int>
    {


        public List<Tb_GuiaTuristico> getListGuiaTuristico()
        {
            using (ImpersonationHelper imp = new ImpersonationHelper(this.Impersonation.User, this.Impersonation.Domain, this.Impersonation.Password))
            {
                if (IsImpersonate)
                {
                    if (!imp.ImpersonateUser())
                    {
                        throw new Exception("The Impersonate has failed");
                    }
                }
                using (DataContext dataContext = this.getInstanceDataContextFactory())
                {
                    return (from p in dataContext.GetTable<Tb_GuiaTuristico>()
                            select p).ToList<Tb_GuiaTuristico>();
                }
            }
        }

        public override Tb_GuiaTuristico update(Tb_GuiaTuristico entity)
        {
            throw new NotImplementedException();
        }

        public override Tb_GuiaTuristico getByID(int id)
        {
            throw new NotImplementedException();
        }

        public override void delete(int pk)
        {
            throw new NotImplementedException();
        }
    }
}
